

<template>
  <!-- 全局控制语言和尺寸 -->
  <el-config-provider :size="size" :locale="locale">
    <div id="app">
      <router-view></router-view>
    </div>
  </el-config-provider>

</template>

<script lang="ts">
// 按需引入国际化配置方式
import zhCn from 'element-plus/lib/locale/lang/zh-cn'
import { computed } from 'vue'
import { useStore } from '@/store'
export default {
  setup() {
    const store = useStore()
    const size = computed(() => store.state.app.size)
    return {
      size,
      // 参考官网国际化
      locale: zhCn,
    }
  }

}
</script>